package org.argus.management.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.argus.common.core.enums.StatusEnum;
import org.argus.management.domain.User;
import org.argus.management.system.model.UserSearchReq;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_user(用户信息表)】的数据库操作Mapper
* @createDate 2024-04-25 19:32:32
* @Entity org.argus.management.domain.User
*/
public interface UserMapper extends BaseMapper<User> {
    Page<User> page(Page page, @Param("req") UserSearchReq req);

    void saveUserDomainRelation(@Param("userId") Long userId, @Param("domainIds")List<String> domainIds);

    void deleteUserDomainRelation(@Param("userId") Long userId);

    void updateUserStatus(@Param("ids") List<Long> ids, @Param("status") StatusEnum statusEnum);

    List<Long> userRoleIds(@Param("id") Long id);

    void deleteUserRoleRel(@Param("userId") Long userId);

    void saveUserRoleRel(@Param("userId") Long userId, @Param("roleIds") List<Long> roleIds);
}